<template>
    <swiper>
      <swiperItem v-for="(item,id) in banners" :key="id">
        <a :href="item.link">
          <img :src="item.image" alt="" @load="handleLoaded">
        </a>
      </swiperItem>
    </swiper>
</template>

<script>
  import {swiper, swiperItem } from 'components/common/swiper/index.js'
  export default {
    props:{
      banners:{
        type:Array,
        default(){
          return []
        }
      }
    },
    data(){
      return {}
    },
	methods:{
		handleLoaded(){
			this.$emit('bannerLoaded')
		}
	},
    components:{
      swiper,
      swiperItem
    }
  }
</script>

<style>
</style>
